icon theme: Actually don't block in gtk_icon_theme_choose_icon_async()
authorAlexander Larsson <alexl@redhat.com>
Wed, 29 Jan 2020 15:42:35 +0000 (16:42 +0100)
committerAlexander Larsson <alexl@redhat.com>
Thu, 30 Jan 2020 09:53:43 +0000 (10:53 +0100)
commit56ec7488245a09e52aaad4386f78dc9d50fc2887
tree7ca075ec06b06d07da63a6d25471a887eea58283
parent1e6a82513bba08bdcbb4fa5da710a3910e2c7a00
icon theme: Actually don't block in gtk_icon_theme_choose_icon_async()

If some other thread is lock the icon or icon theme locks they are likely
to do so for a long time, doing i/o. So, switch to trylock() for the
nonblocking part of _async(). This way we can return directly if the
result is available, but do a thread otherwise, never blocking the
calling (main) thread.
gtk/gtkicontheme.c